@extends('admin.base.parent')
@section('content')
	<div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>

			<ul class="breadcrumb">
				<li>
					<i class="icon-home home-icon"></i>
					<a href="#">主页</a>
				</li>
				<li>
					<a href="#">公告详情页</a>
				</li>
				<li class="active">添加公告</li>
			</ul><!-- .breadcrumb -->
		</div>

		<div class="page-content">
			<div class="page-header">
				<h1>
					添加公告
					<small>
						<i class="icon-double-angle-right"></i>
						公告详情
					</small>
				</h1>
			</div><!-- /.page-header -->
			@if(count($errors)> 0)
				<div class='alert alert-danger'>
					<ul>
						@foreach($errors->all() as $error)
							<li>{{ $error }}</li>
						@endforeach
					</ul>
				</div>
			@endif
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->

					<form class="form-horizontal" role="form" action="{{ url('admin/notice').'/'.$ob->id }}" method='post'>
						{{ csrf_field() }}
						{{ method_field('PUT') }}
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">	公告标题 </label>

							<div class="col-sm-9">
								<input type="text" id="form-field-1" placeholder="请输入公告标题" class="col-xs-10 col-sm-5"  name='title' value='{{ $ob->title }}'/>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">	标题颜色 </label>
							<div class="col-sm-9">
								<select  id="form-field-select-1" class="col-xs-10 col-sm-5" name="color">
									<option value="black" @if($ob->color == 'black') selected @endif >黑色</option>
									<option value="blue " @if($ob->color == 'blue') selected @endif >蓝色</option>
									<option value="pink " @if($ob->color == 'pink') selected @endif >粉色</option>
									<option value="orange " @if($ob->color == 'orange') selected @endif >橘色</option>
								</select>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">	排序编号 </label>
							<div class="col-sm-9">
								<select  id="form-field-select-1" class="col-xs-10 col-sm-5" name="ord">
									<option value="1" @if($ob->ord == 1) selected @endif>1</option>
									<option value="2" @if($ob->ord == 2) selected @endif>2</option>
									<option value="3" @if($ob->ord == 3) selected @endif>3</option>
									<option value="4" @if($ob->ord == 4) selected @endif>4</option>
								</select>
							</div>
						</div>		

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">	公告内容 </label>
							<div class="col-sm-9">
								<textarea name="content" id="form-field-1" cols="30" rows="10" placeholder="请输入公告内容" style="width: 350px; height: 184px;resize: none;">{{ $ob->content }}</textarea>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">	显示状态 </label>
							<div class="col-sm-9">
								<label>
									<input id="" class="ace" type="radio" name='display' value=1 @if($ob->display == 1) checked @endif >
									<span class="lbl"> 不显示 </span>&nbsp;&nbsp;
									<input id="" class="ace" type="radio" name='display' value=2 @if($ob->display ==2 ) checked @endif >
									<span class="lbl"> 显示 </span>
									<span class="lbl"></span>
								</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<span class="smaller"><i class="icon-bookmark-empty  blue"></i> 不选择即为不显示 </span>
						</div>

						</div> 

						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<button class="btn btn-info" type="submit">
									<i class="icon-ok bigger-110"></i>
									提交
								</button>

								&nbsp; &nbsp; &nbsp;
								<button class="btn" type="reset">
									<i class="icon-undo bigger-110"></i>
									重置
								</button>
							</form>
						</div>
					</div>
				</div><!-- /.col -->
			</div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->
@endsection